

from common.setting import ensure_path_sep
from utils.mysqlUtils.db_pool import Database

zhcxkj_center_attribute_db= Database(ensure_path_sep("\\config\\shopeev2_config.yaml.bak"), "test_jdw_database")




class Ct_attribute_base_amazon9:


    @staticmethod
    def get_base_field_name_list(site_id):

        get_base_field_name_list = f"""
        SELECT field_name 
        FROM test_zhcxkj_center_attribute.t_attribute_base_amazon 
        WHERE site_id= %s
        and status=0
        and is_deleted=0
        """
        origin_data = zhcxkj_center_attribute_db.fetch_all_tuple(get_base_field_name_list,(site_id,))
        origin_data = set(map(lambda x: x[0], origin_data))
        return origin_data